package com.miukoo.aikao.core.pojos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
　* 问题信息表
　* @Author miukoo<miukoo@126.com>
　* @Date 2020/11/20 9:55
　* @Version 1.0
  */
@Setter
@Getter
@TableName("qu_question")
public class Question extends BaseModel<Question> {

    private static final long serialVersionUID = 1L;

    /**
     * 题目ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 题目类型
     */
    private Short type;

    /**
     * 1普通,2较难
     */
    private Short level;

    /**
     * 题目内容
     */
    private String content;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;

    /**
     * 题目备注
     */
    private String remark;

    /**
     * 题目备注
     */
    private String coding;

    /**
     * 编程题类型0java,1sql,2html
     */
    @TableField("coding_type")
    private Short codingType;

    /**
     * 编程题答案提交类型0在线1git地址提交2上传
     */
    @TableField("coding_upload_type")
    private Short codingUploadType;

    /**
     * 整题解析
     */
    private String analysis;

    @Override
    public Serializable pkVal() {
        return id;
    }

    /**
     * 问题答案
     */
    @TableField(exist = false)
    List<QuestionAnswer> answers;
}
